from . import main
from flask import render_template, jsonify
from app.main.model import *

@main.route('/')
def index():
    return render_template('main/layui_laytable.html')

# laytable测试
@main.route('/laytable',methods=['POST', 'GET'])
def test():
    # data = request.args.get("pageIndex")
    # data = request.json
    # print(data.get('pageIndex'))
    resp = jsonify({"data":[{"Id":1, "LangName":"英语","LangComment":"asdug"}], "count":100})
    # resp.headers['Access-Control-Allow-Origin'] = '*'
    # print(data)
    return resp